package com.tanhua.bg.controller;



import com.tanhua.bg.service.VideoCheckService;
import com.tanhua.bg.vo.PageResult;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@Slf4j
@RequestMapping("/manage/videos")
public class VideoCheckController {
    @Autowired
    private VideoCheckService videoService;
    @GetMapping
    public PageResult queryVideoList(@RequestParam(value = "page", defaultValue = "1") Integer page,//给一个固定值
                                     @RequestParam(value = "pagesize", defaultValue = "10") Integer pageSize,
                                     @RequestParam("uid") String uid ,//用户id
                                     @RequestParam("sortProp") String sortProp,
                                     @RequestParam("sortOrder") String sortOrder
                                     ){
        PageResult pageResult = this.videoService.queryVideoList(page, pageSize, uid,sortProp,sortOrder);
        return pageResult;//通过返回一个视屏列表返回一个查询数据
    }
}
